<div>
  <div layout="column">
    <ng-form name="addRules" novalidate="">
      <div layout="row">
        <!-- 表单填写内容 -->
        <div layout-padding="">
          <md-input-container class="md-block">
            <label>规则名称</label>
            <input name="rule-name" ng-model="ruleObj.name" required="" ng-disabled="nameReadOnly"/>
          </md-input-container>

          <md-input-container class="md-block">
            <label>规则模式</label>
            <md-select name="rule-type" ng-model="ruleObj.type" required ng-change="testRule()">
              <md-option ng-repeat="m in modes" value="{{m.value}}">{{m.content}}</md-option>
            </md-select>
          </md-input-container>

          <md-input-container class="md-block">
            <label>开头</label>
            <textarea name="rule-begin" ng-model="ruleObj.beginText" rows="2" required="" ng-change="testRule()"></textarea>
          </md-input-container>

          <md-input-container class="md-block" ng-show="ruleObj.type=='2'">
            <label>结尾</label>
            <textarea name="rule-end" ng-model="ruleObj.endText" ng-required="ruleObj.type=='2'" ng-change="testRule()"></textarea>
          </md-input-container>


          <md-input-container class="md-block">
            <!-- {{ruleObj}} -->
            <!-- <label>使用正则表达式</label> -->
            <md-checkbox ng-model="ruleObj.mode" ng-true-value="'reg'" ng-false-value="'signs'" ng-change="testRule()">
              使用正则表达式
            </md-checkbox>
          </md-input-container>

          <md-slider-container class="md-block">
            <label>最少标签数</label>
            <md-slider flex="" min="0" max="10" ng-model="ruleObj.limit" ng-change="testRule()"></md-slider>
            <md-input-container>
              <input flex="" type="number" min="0" max="10" ng-model="ruleObj.limit" ng-change="testRule()"/>
            </md-input-container>
          </md-slider-container>

          <md-slider-container class="md-block">
            <label>模糊系数</label>
            <br />
            <md-slider flex="" min="0" max="10" ng-model="ruleObj.similar" ng-change="testRule()"></md-slider>
            <md-input-container>
              <input flex="" type="number" min="0" max="10" ng-model="ruleObj.similar" ng-change="testRule()"/>
            </md-input-container>
          </md-slider-container>
        </div>
        <!-- 预签内容 -->
        <!-- <div flex="" layout-padding="">
          <label>可能需要的标签</label>
          <md-input-container class="md-block">
            <md-checkbox ng-repeat="tag in tags">
              {{tag}}
            </md-checkbox>
          </md-input-container>

        </div>
      </div> -->
      <!-- {{ruleObj}} -->

      <!-- <md-button class="md-raised" ng-disabled="addRules.$invalid">save</md-button> -->

    </ng-form>
  </div>



</div>
